﻿using KAsFrame.Common.Extensions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KAsFrame.Domain.Certificate.Dto
{
    public class CertificateInfoDto
    {
        public string TempName { get; set; }
        public string Title { get; set; }
        public string CertificateNo { get; set; }
        public string ImgBase64 { get; set; }
        public string BackgroundColor { get; set; }
        [JsonIgnore]
        public string LabelInfos { get; set; }
        public IDictionary<string, string> LabelInfoDic
        {
            get
            {
                return LabelInfos.IsNullOrWhiteSpace() ? null : JsonConvert.DeserializeObject<Dictionary<string, string>>(LabelInfos);
            }
        }
    }
}
